import { createBrowserRouter } from 'react-router-dom';
import GeekLayout from '@/pages/Layout'
import Login from '@/pages/Login'
import {AuthRouter} from '@/components/AuthRouter'
import Home from '@/pages/Home'
import Ariticle from '@/pages/Article'
import Publish from '@/pages/Publish'
const router = createBrowserRouter([
    {
        path: '/',
        element: <AuthRouter><GeekLayout /></AuthRouter>,
        children:[
            {
                // path: '/home',
                index: true,
                element: <Home />,
            },
            {
                path: '/articles',
                element: <Ariticle />,
            },
            {
                path: '/publish',
                element: <Publish />,
            }
        ]
    },
    {
        path: '/login',
        element: <Login />,
    }
])

export default router